import http from './http'
import qs from 'qs'

// 请求首页的数据
export const GetHomeLists = () => http.get('/index/index')

// 搜索功能
export const GetSearchList = (params) => http.get('/search/helper', { params });

// 登录
export const GetLoginList = (params) => http.post('/login', params);


// 全部请求                                    /order/v1/list/1
export const GetAllList = (params) => http.get('/order/v1/list', { params });
//待发货   
export const GetStayList = (params) => http.get('/order/v1/list/1', { params });
// 待收货                                        
export const GetClosedList = (params) => http.get('/order/v1/list/2', { params });
// 待评价
export const GetPingList = (params) => http.get('/order/v1/list/3', { params });
//确认发货
export const GetGoodsList = (params) => http.post('/order/v1/send', params);
//确认收货
export const GetShouList = (params) => http.post(`/order/v1/confirmReceipt/${params.serialNo}`);


// 订单详情 /order/v1/orderInfo/{serialNo}
export const GetDingXList = (params) => http.get(`/order/v1/orderInfo/${params.serialNo}`);

// 提交评论
export const GetSubemItsList = (params) => http.post('/order/v1/evaluate', params);


// 评价详情
export const GetPingXList = (params) => http.get(`/order/v1/evaluateInfo/${params.serialNo}`);
// 个人中心用户展示
export const GetPUsweList = () => http.get('/users/list');

// 个人信息详情

export const GetPUsweListApi = () => http.get('/users/info');
//版本详情
export const GetPBamListApi = () => http.get('/users/version');
// 消息中心列表

export const GetletterListApi = (params) => http.get('/api/message', { params });

// 消息中心详情
export const GetXiaoPingXList = (params) => http.get(`/api/message/${params.id}`);

// 点击已读

export const GetClickList = (params) => http.put('/api/message/updates', qs.stringify(params));

// 物流单详情

export const GetCourierList = (params) => http.get('/api/star', { params });

// 物流单评价详情

export const GetCourierXiaoPingXList = (params) => http.get(`/api/star/${params.id}`);

// 点击提交评价

export const GetClickTijiosList = (params) => http.put('/api/star', params);

// 客户列表信息

export const GetKehuCourierList = (params) => http.get('/api/cust', { params });
// 客户详情

export const GetCourierKehuPingXList = (params) => http.get(`/api/cust/${params.id}`);


//修改客户
export const GetClickjiosList = (params) => http.put('/api/cust', params);

// 客户资产详情

export const GetCourierKehuPingXZList = (params) => http.post(`/api/cust/${params.id}`);

// 新增客户 
export const GetLoginApiAddList = (params) => http.post('/api/cust', params);

// 选择客户 
export const GetChooseApiList = (params) => http.get('/api/cust', { params });
//新增走访客户

export const GetLoginApiAddXList = (params) => http.post('/api/visit', params);

// 详情
export const GetLoginApiListXList = (params) => http.get('/api/visit', { params });